home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / interp / mindy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  2.0 KB  |  77 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: mindy.h,v 1.6 94/11/06 20:01:03 rgs Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30. extern char *exec_file_name;
  31.  
  32. typedef struct _object *obj_t;
  33.  
  34. struct object {
  35.     obj_t class;
  36. };
  37.  
  38. #define obj_is_ptr(o) (((unsigned long)(o))&1)
  39. #define obj_ptr(type, o) ((type)(((unsigned long)(o))-1))
  40. #define ptr_obj(ptr) ((obj_t)(((unsigned long)(ptr))+1))
  41. #define obj_rawptr(o) ((void *)(o))
  42. #define rawptr_obj(p) ((obj_t)(p))
  43.  
  44. extern void lose _ANSI_ARGS_((char *fmt, ...));
  45.  
  46. #define assert(cond) \
  47.     do { \
  48.     if (!(cond)) \
  49.         lose("assertion failed, line %d file %s", __LINE__, __FILE__); \
  50.     } while (0)
  51.  
  52. typedef int boolean;
  53. #define TRUE 1
  54. #define FALSE 0
  55.  
  56. #ifndef NULL
  57. #define NULL ((void*)0)
  58. #endif
  59.  
  60.  
  61. #ifdef sparc
  62. #define SLOW_LONGJMP 1
  63. #endif
  64.  
  65. #ifdef hppa
  66. #define SLOW_FUNCTION_POINTERS 1
  67. #endif
  68.  
  69.  
  70. #ifndef SLOW_LONGJMP
  71. #define SLOW_LONGJMP 0
  72. #endif
  73.  
  74. #ifndef SLOW_FUNCTION_POINTERS
  75. #define SLOW_FUNCTION_POINTERS 0
  76. #endif
  77.